#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
@Project ：图灵学习 
@File    ：10.修改商品价格.py
@IDE     ：PyCharm 
@Author  ：ChenLiGao
@Date    ：2024-10-30 10:00
'''
"""

"""

class Goods:
    def __init__(self):
        self.good_price = 100
        self.discount = 0.8

    @property
    def price(self):
        new_price = self.good_price * self.discount
        return new_price

    @price.setter
    def price(self, value):
        self.good_price = value

    @price.deleter
    def price(self):
        self.discount = 1



good = Goods()
print(good.price)


good.price = 200
print(good.price)

del good.price
print(good.price)